/*
=============================================
 Author:
 Student id:
 Description:
 Date:
=============================================
*/
#include <stdio.h>

void task3(void) {
  // write your code here
  printf("\nTask5: \n");
  // Print the number of bytes used for each data type
  printf("Number of bytes used to store a char type variable is %d\n",
         sizeof(char));
  printf("Number of bytes used to store a short int type variable is %d\n",
         sizeof(short int));
  printf("Number of bytes used to store an int type variable is %d\n",
         sizeof(int));
  printf("Number of bytes used to store a float type variable is %d\n",
         sizeof(float));
  printf("Number of bytes used to store a long int type variable is %d\n",
         sizeof(long int));
  printf("Number of bytes used to store a double type variable is %d\n",
         sizeof(double));
  printf("\n");
}

void task4(void) {
  // write your code here
  printf("\nTask4: \n");
  float y;
  int x;
  char c = '#';
  x = 3.5; // the number 3.5 cannot be changed
  y = 1.5; // the number 1.5 cannot be changed
  printf("x = %d, y = %.1f, c = %c\n", x, y, c); // don’t change this sentence
  printf("\n");
}

void task5(void) {
  // write your code here
  printf("\nTask5: \n");
  char ch;
  printf("Read a character from keyboard: "); // Prompt the user to enter a
                                              // character
  ch = getchar(); // Read the character from the keyboard
  printf("Output the character: ");
  putchar(ch); // Output the character to the screen
  printf("\n");
}

int main() {
  task3(); // call task1 funciton in the main funciton
  task4(); // call task2 funciton in the main funciton
  task5();

  return 0;
}